public class P32 {
    public static void main(String[] args) {
        int arr[] = {90,80,60,50};
        int arr2[] = new int[arr.length+1];
        int score = 70;
        int index = 0;

        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>score&&arr[i+1]<score){
                index = i;
                arr2[index] = score;
                break;
            }
        }

        for (int i = 0; i < index; i++) {
            arr2[i] = arr[i];
        }

        for (int i = index+1; i < arr2.length; i++) {
            arr2[i] = arr[i-1];
        }

        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
    }
}
